.TH lha_stopapp 1 "27 January 2009" "TrueCL Commands"

.SH NAME
lha_stopapp \- Stop an application running in the Cluster

.SH SYNOPSES
.TS
l l.
clreq	[\fB-N|--node\fP \fIX\fP] [\fB-A|--application\fP \fIA\fP] [\fB-timeout\fP \fIN\fP]
	[\fB--force\fP] [\fB--debug\fP|\fB--verbose\fP|\fB--quiet\fP|\fB--silent\fP]
	[\fB--lwidth\fP \fIN\fP]
.TE

.SH DESCRIPTION
The \fIlha_stopapp(1)\fP command is used to stop applications that are currently running 
in the cluster. If an application is not running, is stopping or starting then this
command will abort with an appropriate error message.

Although their are many arguments the command typically to stop an application is
straightforward:

.TS
l.
lha_stopapp -A appname
.TE

If no node is specified the node on which the application is currently believed to be
running on is used. The command does not need to be run on the node where the application
in question is currently running.

.SH ARGUMENTS
.TP 8
--application
This is the name of the currently running application that is to be stopped. This is the only
mandatory argument. For an application to be stopped it obviously must be running, though
see the \fB--force\fP argument to force through certain functionality. 

.TP
--node
By default the command will use the node which the cluster believes is currently running
the application in question as the target to stop the application. This argument allows
the administrator to force the actions to stop the application on the node in question.
This is occasionally useful if TrueCL has lost track of the application for whatever
reason.

.TP
--force
Usually this command will fail unless the application is in a 'RUNNING' state. If a previous
application start-up or shutdown has failed and the clean-up has not worked as expected the 
application might instead be in a state of 'STARTING' or 'STOPPING'. If this is the case the
\fB--force\fP option can be used to re-try stopping the application again.

.TP
--timeout
The amount of time to wait for certain responses to requests that are 
necessary for the application to be stopped.  If this is not specified the
value is taken from the 'stoptimeout' attribute defined for the 
application. If such an attribute is not currently defined it will 
default to 60 [seconds].

.TP
--debug
Run the application shutdown in 'debug' mode - might produce significant levels 
of output to the standard output device, most of which is only useful for
developers.

.TP
--verbose
Verbose mode generates a sensible amount of output to standard output to 
show the progress of application shutdown. This is the recommended flag if
the administrator wishes to see any output.
.TP
--quiet
This will only produce errors and warnings on the standard output device.
.TP
--silent
Only produce output if fatal errors occurs during attempted shutdown of the 
application.

.SH OUTPUT
In verbose mode the utility will show the application shutdown in several
distinct steps - some of which will take longer than others. In particular
the storage de-configuration and application shutdown itself are areas where the
time taken and output generated can differ significant depending on
how the application is configured.

.SH EXIT CODES
If the application is stopped as expected, a return code of '0' will be given, 
indicating success. Otherwise a failure is indicated with a return code of '1'.
If a failure does occur then a suitable error message should be shown on the
standard output device too.

.SH FILES
The utility uses standard error and output for all messages. When the 
applications shutdown occurs, the following log files are used for
any output generated by the scripts:

.TS
l l.
clreqd.stdout	Will contain any standard output text for the application.
clreqd.stderr	Will contain any error output text for the application.
.TE

.SH NOTES
Care must be taken to ensure the amount of time given for the application and
especially the storage to be de-configured is long enough otherwise the stability
of the application and the validity of the data is uses might be at risk.

.SH AUTHOR
The TrueCL software was written by Simon Edwards, (C) 2006-2008, working
for Advantsys Computer Services Ltd - www.advantsys.co.uk.

.SH SEE ALSO
.BR lha_destroyapp(1),
.BR lha_app_probes(1),
.BR lha_app_routes(1),
.BR lha_buildapp(1),
.BR lha_modapp(1),
.BR lha_startapp(1).

.SH AVAILABILITY
This utility was specifically written under the GNU GPL license and as required
by such software comes with \fIno warranty or guarantee of any kind\fP. For
more information, please see the following page: truecl.advantsys.co.uk.

